using MediatR;
using System;
using System.Collections.Generic;

namespace WriteAPI.Command.采购
{
    public class CreateCgddCommand : IRequest<int>
    {
        public string OrderTheme { get; set; } = string.Empty;
        public string PurchaseNumber { get; set; } = string.Empty;
        public bool SystemNumber { get; set; }
        public string? RelatedPurchase { get; set; }
        public string? RelatedSalesOrder { get; set; }
        public bool UnbindSalesOrder { get; set; }
        public DateTime PurchaseDate { get; set; }
        public string SupplierName { get; set; } = string.Empty;
        public string ContactPerson { get; set; } = string.Empty;
        public string Purchaser { get; set; } = string.Empty;
        public string ContactPhone { get; set; } = string.Empty;
        public string ContactMethod { get; set; } = string.Empty;
        public string SettlementMethod { get; set; } = string.Empty;
        public string PurchaseDepartment { get; set; } = string.Empty;
        public string RelatedProject { get; set; } = string.Empty;
        public string DeliveryAddress { get; set; } = string.Empty;
        public string Remarks { get; set; } = string.Empty;
        public List<CgddItemDto> CgddItems { get; set; } = new();
    }

    public class CgddItemDto
    {
        public string ItemCode { get; set; } = string.Empty;
        public string ItemName { get; set; } = string.Empty;
        public string Spec { get; set; } = string.Empty;
        public string Unit { get; set; } = string.Empty;
        public string Brand { get; set; } = string.Empty;
        public decimal Quantity { get; set; }
        public decimal TaxRate { get; set; }
        public decimal TaxIncludedPrice { get; set; }
        public decimal TotalWithTax { get; set; }
        public decimal PriceWithoutTax { get; set; }
        public decimal AmountWithoutTax { get; set; }
        public DateTime? DeliveryDate { get; set; }
        public decimal MainUnitQuantity { get; set; }
        public string Progress { get; set; } = string.Empty;
        public string Remark { get; set; } = string.Empty;
    }
} 